/**
 */
package gatperdut.chato.model.Chato.Player.impl;

import gatperdut.chato.model.Chato.ChatoPackage;
import gatperdut.chato.model.Chato.Constant.ConstantPackage;
import gatperdut.chato.model.Chato.Constant.impl.ConstantPackageImpl;
import gatperdut.chato.model.Chato.Container.ContainerPackage;
import gatperdut.chato.model.Chato.Container.impl.ContainerPackageImpl;
import gatperdut.chato.model.Chato.Craft.CraftPackage;
import gatperdut.chato.model.Chato.Craft.impl.CraftPackageImpl;
import gatperdut.chato.model.Chato.Entity.EntityPackage;
import gatperdut.chato.model.Chato.Entity.Skill.SkillPackage;
import gatperdut.chato.model.Chato.Entity.Skill.impl.SkillPackageImpl;
import gatperdut.chato.model.Chato.Entity.impl.EntityPackageImpl;
import gatperdut.chato.model.Chato.Item.ItemPackage;
import gatperdut.chato.model.Chato.Item.impl.ItemPackageImpl;
import gatperdut.chato.model.Chato.Player.Player;
import gatperdut.chato.model.Chato.Player.PlayerFactory;
import gatperdut.chato.model.Chato.Player.PlayerPackage;
import gatperdut.chato.model.Chato.Room.RoomPackage;
import gatperdut.chato.model.Chato.Room.impl.RoomPackageImpl;
import gatperdut.chato.model.Chato.Util.UtilPackage;
import gatperdut.chato.model.Chato.Util.impl.UtilPackageImpl;
import gatperdut.chato.model.Chato.impl.ChatoPackageImpl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class PlayerPackageImpl extends EPackageImpl implements PlayerPackage {
	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EClass playerEClass = null;

	/**
     * Creates an instance of the model <b>Package</b>, registered with
     * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
     * package URI value.
     * <p>Note: the correct way to create the package is via the static
     * factory method {@link #init init()}, which also performs
     * initialization of the package, or returns the registered package,
     * if one already exists.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see org.eclipse.emf.ecore.EPackage.Registry
     * @see gatperdut.chato.model.Chato.Player.PlayerPackage#eNS_URI
     * @see #init()
     * @generated
     */
	private PlayerPackageImpl() {
        super(eNS_URI, PlayerFactory.eINSTANCE);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private static boolean isInited = false;

	/**
     * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
     * 
     * <p>This method is used to initialize {@link PlayerPackage#eINSTANCE} when that field is accessed.
     * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #eNS_URI
     * @see #createPackageContents()
     * @see #initializePackageContents()
     * @generated
     */
	public static PlayerPackage init() {
        if (isInited) return (PlayerPackage)EPackage.Registry.INSTANCE.getEPackage(PlayerPackage.eNS_URI);

        // Obtain or create and register package
        PlayerPackageImpl thePlayerPackage = (PlayerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PlayerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PlayerPackageImpl());

        isInited = true;

        // Obtain or create and register interdependencies
        ChatoPackageImpl theChatoPackage = (ChatoPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ChatoPackage.eNS_URI) instanceof ChatoPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ChatoPackage.eNS_URI) : ChatoPackage.eINSTANCE);
        EntityPackageImpl theEntityPackage = (EntityPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI) instanceof EntityPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI) : EntityPackage.eINSTANCE);
        SkillPackageImpl theSkillPackage = (SkillPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SkillPackage.eNS_URI) instanceof SkillPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SkillPackage.eNS_URI) : SkillPackage.eINSTANCE);
        RoomPackageImpl theRoomPackage = (RoomPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(RoomPackage.eNS_URI) instanceof RoomPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RoomPackage.eNS_URI) : RoomPackage.eINSTANCE);
        ItemPackageImpl theItemPackage = (ItemPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ItemPackage.eNS_URI) instanceof ItemPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ItemPackage.eNS_URI) : ItemPackage.eINSTANCE);
        ConstantPackageImpl theConstantPackage = (ConstantPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ConstantPackage.eNS_URI) instanceof ConstantPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstantPackage.eNS_URI) : ConstantPackage.eINSTANCE);
        ContainerPackageImpl theContainerPackage = (ContainerPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ContainerPackage.eNS_URI) instanceof ContainerPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ContainerPackage.eNS_URI) : ContainerPackage.eINSTANCE);
        CraftPackageImpl theCraftPackage = (CraftPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI) instanceof CraftPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI) : CraftPackage.eINSTANCE);
        UtilPackageImpl theUtilPackage = (UtilPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UtilPackage.eNS_URI) instanceof UtilPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UtilPackage.eNS_URI) : UtilPackage.eINSTANCE);

        // Create package meta-data objects
        thePlayerPackage.createPackageContents();
        theChatoPackage.createPackageContents();
        theEntityPackage.createPackageContents();
        theSkillPackage.createPackageContents();
        theRoomPackage.createPackageContents();
        theItemPackage.createPackageContents();
        theConstantPackage.createPackageContents();
        theContainerPackage.createPackageContents();
        theCraftPackage.createPackageContents();
        theUtilPackage.createPackageContents();

        // Initialize created meta-data
        thePlayerPackage.initializePackageContents();
        theChatoPackage.initializePackageContents();
        theEntityPackage.initializePackageContents();
        theSkillPackage.initializePackageContents();
        theRoomPackage.initializePackageContents();
        theItemPackage.initializePackageContents();
        theConstantPackage.initializePackageContents();
        theContainerPackage.initializePackageContents();
        theCraftPackage.initializePackageContents();
        theUtilPackage.initializePackageContents();

        // Mark meta-data to indicate it can't be changed
        thePlayerPackage.freeze();

  
        // Update the registry and return the package
        EPackage.Registry.INSTANCE.put(PlayerPackage.eNS_URI, thePlayerPackage);
        return thePlayerPackage;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EClass getPlayer() {
        return playerEClass;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getPlayer_Username() {
        return (EAttribute)playerEClass.getEStructuralFeatures().get(0);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getPlayer_Password() {
        return (EAttribute)playerEClass.getEStructuralFeatures().get(1);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getPlayer_Admin() {
        return (EAttribute)playerEClass.getEStructuralFeatures().get(2);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getPlayer_CurrentPC() {
        return (EReference)playerEClass.getEStructuralFeatures().get(3);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public PlayerFactory getPlayerFactory() {
        return (PlayerFactory)getEFactoryInstance();
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private boolean isCreated = false;

	/**
     * Creates the meta-model objects for the package.  This method is
     * guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void createPackageContents() {
        if (isCreated) return;
        isCreated = true;

        // Create classes and their features
        playerEClass = createEClass(PLAYER);
        createEAttribute(playerEClass, PLAYER__USERNAME);
        createEAttribute(playerEClass, PLAYER__PASSWORD);
        createEAttribute(playerEClass, PLAYER__ADMIN);
        createEReference(playerEClass, PLAYER__CURRENT_PC);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private boolean isInitialized = false;

	/**
     * Complete the initialization of the package and its meta-model.  This
     * method is guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void initializePackageContents() {
        if (isInitialized) return;
        isInitialized = true;

        // Initialize package
        setName(eNAME);
        setNsPrefix(eNS_PREFIX);
        setNsURI(eNS_URI);

        // Obtain other dependent packages
        EntityPackage theEntityPackage = (EntityPackage)EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI);

        // Create type parameters

        // Set bounds for type parameters

        // Add supertypes to classes

        // Initialize classes, features, and operations; add parameters
        initEClass(playerEClass, Player.class, "Player", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getPlayer_Username(), ecorePackage.getEString(), "username", null, 1, 1, Player.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getPlayer_Password(), ecorePackage.getEString(), "password", null, 1, 1, Player.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getPlayer_Admin(), ecorePackage.getEBoolean(), "admin", "false", 1, 1, Player.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getPlayer_CurrentPC(), theEntityPackage.getPC(), theEntityPackage.getPC_Owner(), "currentPC", null, 0, 1, Player.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    }

} //PlayerPackageImpl
